const { Schema, model } = require('./db');

const BlogSchema = new Schema({
  visible: {},
  created_at: String,
  id: Number,
  idstr: String,
  mid: String,
  mblogid: String,
  user: {},
  can_edit: Boolean,
  edit_count: Number,
  text_raw: String,
  text: String,
  textLength: Number,
  source: String,
  favorited: Boolean,
  rid: String,
  cardid: String,
  pic_ids: [],
  geo: String,
  pic_num: Number,
  is_paid: Boolean,
  pic_bg_new: String,
  mblog_vip_type: Number,
  number_display_strategy: {},
  reposts_count: Number,
  comments_count: Number,
  attitudes_count: Number,
  attitudes_status: Number,
  continue_tag: {},
  isLongText: Boolean,
  mlevel: Number,
  content_auth: Number,
  is_show_bulletin: Number,
  comment_manage_info: {},
  share_repost_type: Number,
  isTop: Number,
  title: {},
  mblogtype: Number,
  showFeedRepost: Boolean,
  showFeedComment: Boolean,
  pictureViewerSign: Boolean,
  showPictureViewer: Boolean,
  rcList: [],
  customIcons: []
});

// 直接返回数据模型,可以直接操作集合
module.exports = model('Blog', BlogSchema, 'blog');
// 直接一个js文件就是一张表(一个集合)
// require的时候推荐大写
